package com.dingreading.cloud.admin.service;

import com.dingreading.cloud.admin.dto.CmorderDto;
import com.dingreading.cloud.admin.entity.Cmorders;
import com.dingreading.cloud.common.util.PageDto;
import com.dingreading.cloud.common.util.PageUtil;
import com.mybatisflex.core.service.IService;

import java.util.List;

/**
 * 服务层。
 *
 * @author Administrator
 * @since 2023-11-22
 */
public interface CmordersService extends IService<Cmorders> {

    PageDto<CmorderDto> page(
            PageUtil pageUtil, List<String> selfAndJoinCorpUidList, String storeUid, String keyword, List<String> orderType,
            Integer status, String beginDate, String endDate, String checkBeginDate, String checkEndDate,
            Double orderAmount
    );

    Cmorders getByOrderCode(String storeUid, String memberUid, String orderCode);

    CmorderDto getDtoByOrderCode(String storeUid, String memberUid, String orderCode);

    boolean updateStatus(String orderCode, Integer status, String statusName);

    boolean updateStatusByOrderCods(List<String> orderCodes, Integer status, String statusName);

    List<CmorderDto> dotListByOrderCodeIn(List<String> orderCodeList);

    List<Cmorders> listByOrderCodeIn(List<String> orderCodeList);

}
